<template>
  <div>
    <div class="titletopXX">
      <van-nav-bar
        size="30"
        title="后台管理"
        left-arrow
        right-text=""
        :fixed="true"
        @click-left="onClickLeft"
      />
    </div>
    <div class="pull-refresh">
      <div class="ul">
        <div
          class="li"
          v-for="(item, index) in list"
          :key="index"
          @click="TZdy(item)"
        >
          <van-image
            class="img"
            width="35px"
            height="35px"
            :src="item.auditImage"
            mode="widthFix"
          ></van-image>
          <div class="WZ_size_14">
            {{ item.siteName }}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { getSiteOrderBackList } from "@/api/realAssets/icsharedstation/manager.js";
import {
  getpersonalInformation,
  setpersonalInformation,
} from "../../common/RYXX";
export default {
  data() {
    return {
      title: "后台管理",
      list: [],
    };
  },
  created() {},
  mounted() {
    this.getXX();
  },
  methods: {
    TZdy(val) {
      localStorage.setItem("siteData", JSON.stringify(val));
      console.log(val.backUrl);
       this.$router.push(val.backUrl);
      // router.push({
      //   path: val.backUrl,
      // });
    },
    onClickLeft() {
      this.$router.push({
        name: "rvicsharedstation-AdminPages_Adminindex",
      });
    },
    getXX() {
      let obj = {
        postId: JSON.parse(getpersonalInformation()).postId,
        userId: JSON.parse(getpersonalInformation()).userId,
      };
      getSiteOrderBackList(obj).then((res) => {
        this.list = res.data;
        console.log(this.list);
      });
    },
  },
};
</script>

<style lang="less" scoped>
@import "../../static/css/index.less";
.pull-refresh {
  background: url("../../static/GDBJ.png") no-repeat;
  background-size: 100% 100%;
}
.ul {
  display: flex;
  flex-wrap: wrap;
  .li {
    text-align: center;
    width: 70px;
    height: 70px;
    padding: 10px;
  }
}
.titletopXX {
  height: 45px;
}
</style>
